home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17808 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news.dal.ca!news
  2. From: Dan Kelley <d.kelley@dal.ca>
  3. Newsgroups: comp.lang.c++,gnu.gcc.help
  4. Subject: how to instantiate STL sort() routine?
  5. Date: Wed, 17 Apr 1996 13:58:30 -0300
  6. Organization: Dalhousie University
  7. Message-ID: <31752336.17DD@dal.ca>
  8. NNTP-Posting-Host: skye.phys.ocean.dal.ca
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.4 sun4m)
  13.  
  14. Can anyone advise me as to how to instantiate the STL (standard template library) routine
  15. called sort()?  I'm working on a simple vector<double> structure.  I use the
  16. -fno-implicit-templates compilation flag, for all files in my project except for one, and in
  17. that file I have no code at all, except for a bunch of instantiation commands like
  18.  
  19.     template class vector<double>;
  20.  
  21. So the question is what kind of line I should add to this template file, so that in another
  22. file I could do e.g.
  23.  
  24.     vector<double> a;
  25.     // assign some stuff into a
  26.     sort(a.begin(), a.end());
  27.  
  28. Thanks very much in advance, to anybody who can help me out.  An email reply would be lovely,
  29. and I'd be happy to post a summary of the solution to my problem to these newsgroups.
  30.  
  31. PS: I'm sorry to be repeating this question, which I also asked a few days back, but I'm still
  32. lost after the intervening time and hope to get help.  Thanks.
  33.  
  34. -- 
  35. Dan E. Kelley                   internet:         mailto:Dan.Kelley@Dal.CA
  36. Oceanography Department         phone:                       (902)494-1694
  37. Dalhousie University            fax:                         (902)494-2885
  38. Halifax, NS, CANADA, B3H 4J1    WWW:  http://www.phys.ocean.dal.ca/~kelley
  39.